﻿using System;

namespace SilverQuery
{
	/// <summary>
	/// Base class for SilverQuery plugins.
	/// </summary>
	public abstract class SilverQueryPlugin : SilverQueryObject
	{
		/// <summary>
		/// Execute the plugin and return the selected set.
		/// </summary>
		/// <param name="set">The selected set to operate on.</param>
		/// <param name="options">Options for the plugin.</param>
		/// <returns></returns>
		public virtual jQuery Execute(jQuery set, map options)
		{
			throw new NotImplementedException("Execute(set, options) method not implemented.");
		}

		/// <summary>
		/// Execute the plugin.
		/// </summary>
		/// <param name="set">The selected set to operate on.</param>
		/// <returns></returns>
		public virtual jQuery Execute(jQuery set)
		{
			throw new NotImplementedException("Execute(set) method not implemented.");
		}

		/// <summary>
		/// Execute the plugin.
		/// </summary>
		/// <param name="set">The selected set to operate on.</param>
		/// <param name="args">Arguments to the plugin.</param>
		/// <returns></returns>
		public virtual jQuery Execute(jQuery set, params object[] args)
		{
			throw new NotImplementedException("Execute(set, args) method not implemented.");
		}
	}
}
